//
//  AboutViewController.m
//  CT.Mobile
//
//  Created by guochuangkeshi on 15/11/13.
//  Copyright © 2015年 guochuangkeshi. All rights reserved.
//

#import "AboutViewController.h"

@interface AboutViewController ()

@end

@implementation AboutViewController

- (void)viewDidLoad {
    
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    UILabel *titleLab = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, 100, 40)];
    titleLab.text = @"关于";
    titleLab.textColor = [UIColor whiteColor];
    [self setBackBar];
    titleLab.textAlignment = NSTextAlignmentCenter;
    self.navigationItem.titleView = titleLab;
    self.navigationController.navigationBar.barTintColor = COLOR_RGBA(77, 155, 255, 1);
    self.view.backgroundColor=GRAYCOLOR;
    
    [self setBackBar];
    [self addImage];
    
}
#pragma mark 返回
- (void)setBackBar{
    
    BackButton *backBtn=[BackButton buttonWithType:UIButtonTypeCustom];
    backBtn.frame = CGRectMake(0, 0, 44, 44);
    [backBtn addTarget:self action:@selector(backController:) forControlEvents:UIControlEventTouchUpInside];
    [backBtn setImage:[UIImage imageNamed:@"返回"] forState:UIControlStateNormal];
    [backBtn.imageView setContentMode:UIViewContentModeLeft];
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]initWithCustomView:backBtn];
}


- (void)addImage{
    
    UIImageView *imageV = [[UIImageView alloc]initWithFrame:CGRectMake((kScreenWidth-100)/2, 100, 100, 100)];
    imageV.image = [UIImage imageNamed:@"logo"];
    imageV.contentMode = UIViewContentModeScaleAspectFill;
    imageV.layer.masksToBounds = YES;
    imageV.layer.cornerRadius = 20;
    [self.view addSubview:imageV];
    
    UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake((kScreenWidth-100)/2, 210, 100, 20)];
    label.text=@"大众创秀";
    label.textAlignment=NSTextAlignmentCenter;
    label.textColor=COLOR_RGBA(189, 189, 189, 1.0);
    [self.view addSubview:label];

    UILabel *versionLab =[[UILabel alloc]initWithFrame:CGRectMake((kScreenWidth-150)/2, 230, 150, 20)];
    versionLab.text=@"Version  1.0.0";
    versionLab.textAlignment=NSTextAlignmentCenter;
    versionLab.textColor=COLOR_RGBA(189, 189, 189, 1.0);
    [self.view addSubview:versionLab];
    
    UILabel *updateLab =[[UILabel alloc]initWithFrame:CGRectMake(0, kScreenHeight-20, kScreenWidth-10, 20)];
    updateLab.text=@"2016-04-27";
    updateLab.textAlignment=NSTextAlignmentRight;
    updateLab.textColor=COLOR_RGBA(189, 189, 189, 1.0);
    [self.view addSubview:updateLab];
    
    [self addLabel];
}

- (void)addLabel{

    UILabel *label = [[UILabel alloc]init];
    label.frame=CGRectMake(15, 220, kScreenWidth-30, 200);
    label.numberOfLines=0;
    label.font=[UIFont systemFontOfSize:14];
    label.lineBreakMode = NSLineBreakByWordWrapping;
    label.text=@"版权所有©北京云真网络技术服务有限公司 2015-2017。保留一切权利。本程序受版权法和架构保护法的保护，凡未经授权而擅自复制本软件的部分或全部内容，将要承担严厉的民事或刑事责任！";
    [self.view addSubview:label];

}

- (void)backController:(UIButton *)btn{
    
    [self.navigationController popViewControllerAnimated:YES];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
